﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true" CodeBehind="SubscriptionsList.aspx.cs" Inherits="OpenWaves.ActivityFeed.Web.Tests.SubscriptionsList" %>
<%@ Import Namespace="OpenWaves.ActivityFeed" %>

<%@ Register TagPrefix="af" Namespace="OpenWaves.ActivityFeed.Web.Controls" Assembly="OpenWaves.ActivityFeed.Web" %>


<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

     <style type="text/css">        
        li 
        {
            padding-bottom: 10px;
        }
    </style>


</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="cphBody" runat="server">

    <h3>List of available topic</h3>
    <div>
        <p>By clicking one the link you can follow/unfollow topics (fake topics)</p>
        <asp:ListView ID="lstMain" runat="server">
            <LayoutTemplate>
                <ul>
                    <asp:PlaceHolder ID="itemPlaceHolder" runat="server"></asp:PlaceHolder>
                </ul>
            </LayoutTemplate>
            <ItemTemplate>
                <li>
                <asp:Label runat="server" Text='<%# Eval("Title") %>'></asp:Label>
                <af:ActivityFeedSubscribeButton runat="server" Topic='<%# Topic.FromUserId(Eval("Id") as string) %>'>
                    <span class="subscribe">Follow <%# Eval("Id") %></span>
                    <span class="unsubscribe">Unfollow <%# Eval("Id") %></span>
                </af:ActivityFeedSubscribeButton>
                </li>
            </ItemTemplate>
        </asp:ListView>
    </div>    
    
    
    <h3>Like last update by:</h3>
    <div>
        <p>By clicking one of the button you can like latest update by selected user</p>
        <asp:Button runat="server" OnClick="btnLikeLastUpdateBy" Text="John" CommandArgument="john"/>
        <asp:Button runat="server" OnClick="btnLikeLastUpdateBy" Text="Sam" CommandArgument="sam"/>
        <asp:Button runat="server" OnClick="btnLikeLastUpdateBy" Text="Bob" CommandArgument="bob"/>
        <asp:Button runat="server" OnClick="btnLikeLastUpdateBy" Text="Michael" CommandArgument="michael"/>
        <asp:Button runat="server" OnClick="btnLikeLastUpdateBy" Text="David" CommandArgument="david"/>
        <asp:Button runat="server" OnClick="btnLikeLastUpdateBy" Text="Charles" CommandArgument="charles"/>
        <asp:Button runat="server" OnClick="btnLikeLastUpdateBy" Text="Paul" CommandArgument="paul"/>
        <asp:Button runat="server" OnClick="btnLikeLastUpdateBy" Text="Steven" CommandArgument="steven"/>
    </div>
    
    <h3>Post unhandled update content type</h3>
    <div>
        <p>This functionality is used to test situation when unknown update content type is posted</p>
        <asp:Button runat="server" OnClick="OnUnhandledUpdateContentTypeClick" Text="Post custom update content type" />
    </div>

</asp:Content>
